import logging
import requests

logger = logging.getLogger(__name__)

def 订单上传(filepath):
    url = 'http://192.168.16.240:8001/api/VerifyOrder/VerifyOrder/ImportOrderAsync'
    files = {'file': ('订单.xlsx', open(filepath, 'rb'))}
    res = requests.post(url, files=files)
    if res.status_code == 200 and 'false' not in res.text:
        # print('订单上传成功')
        # print(res.text)
        logger.info(res.text)
        logger.info('订单上传成功')
    else:
        logger.info('订单上传失败')
